//package com.bwda.dsrs.filecenter.controller;
//
//import com.bwda.dsrs.base.centerbase.response.CentreCutPageResponse;
//import com.bwda.dsrs.base.centerbase.response.CentreListResponse;
//import com.bwda.dsrs.base.centerbase.response.ResponseEntity;
//import com.bwda.dsrs.base.util.CopyUtil;
//import com.bwda.dsrs.filecenter.annotations.IgnoreClientToken;
//import com.bwda.dsrs.filecenter.annotations.NeedRole;
//import com.bwda.dsrs.filecenter.api.OrgServiceApi;
//import com.bwda.dsrs.filecenter.api.clientappversion.datadict.DatadictQueryForm;
//import com.bwda.dsrs.filecenter.api.clientappversion.datadict.DatadictVo;
//import com.bwda.dsrs.filecenter.api.clientappversion.org.OrgTreeForm;
//import com.bwda.dsrs.filecenter.api.clientappversion.user.UserPo;
//import com.bwda.dsrs.filecenter.api.clientappversion.user.UserQueryForm;
//import com.bwda.dsrs.filecenter.api.clientappversion.user.UserVo;
//import com.bwda.dsrs.filecenter.aspect.LogTypeEnum;
//import com.bwda.dsrs.filecenter.aspect.Loggable;
//import com.bwda.dsrs.filecenter.domain.BusinessConstants;
//import com.bwda.dsrs.filecenter.domain.condition.strategycontrol.StrategyControlCondition;
//import com.bwda.dsrs.filecenter.domain.condition.userstrategyrel.UserStrategyRelCondition;
//import com.bwda.dsrs.filecenter.domain.exception.BusinessServiceException;
//import com.bwda.dsrs.filecenter.domain.form.strategycontrol.*;
//import com.bwda.dsrs.filecenter.domain.form.userstrategyrel.UserStrategyRelCreateForm;
//import com.bwda.dsrs.filecenter.domain.form.userstrategyrel.UserStrategyRelUpdateForm;
//import com.bwda.dsrs.filecenter.domain.po.strategycontrol.StrategyControlPo;
//import com.bwda.dsrs.filecenter.domain.po.userstrategyrel.UserStrategyRelPo;
//import com.bwda.dsrs.filecenter.domain.vo.strategycontrol.StrategyControlVo;
//import com.bwda.dsrs.filecenter.domain.vo.userstrategyrel.UserStrategyRelVo;
//import com.bwda.dsrs.filecenter.service.StrategyControlService;
//import com.bwda.dsrs.filecenter.service.UserStrategyRelService;
//import com.bwda.dsrs.systemservice.domain.condition.user.UserCondition;
//import com.bwda.dsrs.systemservice.domain.exception.SystemServiceException;
//import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation;
//import io.swagger.annotations.ApiParam;
//import org.apache.commons.lang.StringUtils;
//import org.slf4j.Logger;
//import org.slf4j.LoggerFactory;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.util.CollectionUtils;
//import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource;
//import javax.servlet.http.HttpServletRequest;
//import javax.validation.Valid;
//import java.util.ArrayList;
//import java.util.Collections;
//import java.util.Date;
//import java.util.List;
//
///**
// * 策略管理--管控策略--控制层
// *
// * @author zhangyinmei
// * @date 2019年4月28日
// */
//@RestController
//@RequestMapping("/b/strategycontrol")
//@Api(value = "/b/strategycontrol", tags = "管控策略")
//public class StrategyControlController extends BaseController {
//    private static final Logger logger = LoggerFactory.getLogger(StrategyControlController.class);
//    @Autowired
//    private StrategyControlService strategyControlService;
//
//    @Autowired
//    private UserStrategyRelService userStrategyRelService;
//
//    @Resource
//    private OrgServiceApi orgServiceApi;
//
//    /**
//     * 查询组织树
//     *
//     * @return
//     * @throws SystemServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询业务处理字典数据", notes = "查询业务处理字典数据", httpMethod = "GET")
//    @Loggable(descp = "查询业务处理字典数据", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryServerType", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<CentreListResponse<DatadictVo>> queryServerType() {
//        logger.info("调用字典接口，查询业务处理字典数据。");
//        DatadictQueryForm datadictQueryForm = new DatadictQueryForm();
//        datadictQueryForm.setDataDictTypeCode(BusinessConstants.SERVER_TYPE);
//        ResponseEntity<CentreListResponse<DatadictVo>> datadictVo = orgServiceApi.queryDatadictList(datadictQueryForm);
//        logger.info("结束调用。");
//        return getSuccessResult(datadictVo.getData());
//    }
//
//    /**
//     * 查询组织树
//     *
//     * @return
//     * @throws SystemServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询组织树", notes = "查询组织树", httpMethod = "GET")
//    @Loggable(descp = "查询组织树", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryOrgTree", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<List<OrgTreeForm>> queryOrgTree() {
//        logger.info("开始调用systemservice组织树。");
//        List<OrgTreeForm> treeList = orgServiceApi.queryOrgTree();
//        logger.info("结束调用。");
//        return getSuccessResult(treeList);
//    }
//
//    /**
//     * 查询用户列表
//     *
//     * @param form
//     * @return
//     * @throws SystemServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询用户表列表(带分页)", notes = "查询用户表列表(带分页)", httpMethod = "GET")
//    @Loggable(descp = "查询用户表列表(带分页)", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryUserList", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<CentreCutPageResponse<UserPo>> queryUserList(@ModelAttribute @Valid StrategyAndOrgForm form) {
//        logger.info("开始调用systemservice查询用户表列表(带分页)。");
//        UserQueryForm userQueryForm = new UserQueryForm();
//        userQueryForm.setOrgId(form.getOrgId());
//        userQueryForm.setPageNum(form.getPageNum());
//        userQueryForm.setPageSize(form.getPageSize());
//        //需要标记出已经绑定的用户
//        ResponseEntity<CentreCutPageResponse<UserPo>> userEntity = orgServiceApi.queryUserPageList(userQueryForm);
//        List<UserPo> userPoList = null;
//        List<UserPo> filterList = null;
//        if (userEntity == null || userEntity.getData() == null) {
//            return null;
//        } else {
//            userPoList = userEntity.getData().getDataList();
//            filterList = new ArrayList<UserPo>();
//            for (UserPo userPo : userPoList) {
//                UserStrategyRelCondition scondition = new UserStrategyRelCondition();
//                scondition.setUserCode(userPo.getUserCode());
//                filterList.add(userPo);
//            }
//            UserStrategyRelCondition condition = new UserStrategyRelCondition();
//            condition.setStrategyId(form.getStrategyId());
//            List<UserStrategyRelPo> relPoList = userStrategyRelService.queryList(condition);
//            for (UserStrategyRelPo po : relPoList) {
//                for (UserPo userPo : filterList) {
//                    if (StringUtils.equals(po.getUserCode(), userPo.getUserCode())) {
//                        userPo.setCheckedFlag(true);
//                        break;
//                    }
//                }
//            }
//        }
//        userEntity.getData().setDataList(filterList);
//        return userEntity;
//    }
//
//    /**
//     * 查询管控策略列表（带分页）
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询管控策略列表(带分页)", notes = "查询管控策略列表(带分页)", httpMethod = "GET")
//    @Loggable(descp = "查询管控策略列表(带分页)", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryPageList", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<CentreCutPageResponse<StrategyControlVo>> queryPageList(@ModelAttribute @Valid StrategyControlQueryForm form) throws BusinessServiceException {
//        logger.info("查询管控策略列表(带分页)");
//        StrategyControlCondition condition = this.getConditionByQueryForm(form);
//        condition.setDelFlag(BusinessConstants.DelFlag.NOT_DELETED);
//        List<StrategyControlVo> voList = new ArrayList<>();
//        int count = strategyControlService.queryCount(condition);
//        if (count > BusinessConstants.NumberConstant.ZERO) {
//            List<StrategyControlPo> poList = strategyControlService.queryList(condition);
//            Collections.reverse(poList);
//            voList = CopyUtil.transfer(poList, StrategyControlVo.class);
//        }
//        return getSuccessResult(getPageResponse(form, count, voList));
//    }
//
//    /**
//     * 查询内置管控策略列表（带分页）
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询内置管控策略列表(带分页)", notes = "查询内置管控策略列表(带分页)", httpMethod = "GET")
//    @Loggable(descp = "查询内置管控策略列表(带分页)", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryBuildInPageList", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<CentreCutPageResponse<StrategyControlVo>> queryBuildInPageList(@ModelAttribute @Valid StrategyControlQueryForm form) throws BusinessServiceException {
//        logger.info("查询内置管控策略列表(带分页)");
//        ResponseEntity<CentreListResponse<DatadictVo>> responseEntity = this.queryRiskModelActive();
//        List<DatadictVo> lists = responseEntity.getData().getDataList();
//        if (lists == null || lists.size() == 0) {
//            throw new BusinessServiceException("内置策略未设置管控模式。");
//        }
//        StrategyControlCondition condition = this.getConditionByQueryForm(form);
//        condition.setRiskModel(Integer.parseInt(lists.get(0).getDataDictValue()));
//        condition.setDelFlag(BusinessConstants.DelFlag.NOT_DELETED);
//        List<StrategyControlVo> voList = new ArrayList<>();
//        int count = strategyControlService.queryCount(condition);
//        if (count > BusinessConstants.NumberConstant.ZERO) {
//            List<StrategyControlPo> poList = strategyControlService.queryList(condition);
//            voList = CopyUtil.transfer(poList, StrategyControlVo.class);
//        }
//        return getSuccessResult(getPageResponse(form, count, voList));
//    }
//
//    /**
//     * 新增管控策略
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "新增管控策略", notes = "新增管控策略", httpMethod = "POST")
//    @Loggable(descp = "新增管控策略", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/add", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<StrategyControlVo> add(@ModelAttribute @Valid StrategyControlCreateForm form, HttpServletRequest request) throws BusinessServiceException {
//        logger.info("新增管控策略");
//        StrategyControlPo po = CopyUtil.transfer(form, StrategyControlPo.class);
//        //设置为自定义数据
//        po.setRiskModel(BusinessConstants.BuiltInDataFlag.NOT_BUILTIN_DATA);
//        //获取系统当前时间
//        Date currentTime = new Date();
//        //设置创建时间
//        po.setCreateTime(currentTime);
//        //设置更新时间
//        po.setUpdateTime(currentTime);
//        //设置是否删除为未删除
//        po.setDelFlag(BusinessConstants.DelFlag.NOT_DELETED);
//
//        //获取创建人编号,调用接口获取
//        String createUserCode = getUserCode();
//        //设置创建人编号
//        po.setCreateUserCode(createUserCode);
//        //设置更新人编号
//        po.setUpdateUserCode(createUserCode);
//        strategyControlService.insert(po);
//        StrategyControlVo vo = CopyUtil.transfer(po, StrategyControlVo.class);
//        return getSuccessResult(vo);
//    }
//
//    /**
//     * 校验设置人员
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "校验设置人员", notes = "校验设置人员", httpMethod = "POST")
//    @Loggable(descp = "校验设置人员", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/checkStrategyUser", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<List<UserStrategyRelPo>> checkStrategyUser(@ModelAttribute @Valid UserStrategyRelCreateForm form) {
//        logger.info("校验设置人员");
//        //判断配置的人员是否已经匹配了风险等级
//        //获取人员编码，Form中已经校验是否为空。
//        List<String> userCodeList = form.getUserCodeList();
//        if (null == userCodeList || userCodeList.isEmpty()) {
//            return getFailResult("未设置用户,请重新设置。");
//        }
//        //根据人员编码集合查询是否有记录
//        UserStrategyRelCondition userStrategyRelCondition = new UserStrategyRelCondition();
//        userStrategyRelCondition.setUserCodeList(userCodeList);
//        userStrategyRelCondition.setStrategyId(form.getStrategyId());
//        List<UserStrategyRelPo> userStrategyRelPoList = userStrategyRelService.selectListForOther(userStrategyRelCondition);
//        //定义是否配置，默认未配置
//        if (userStrategyRelPoList != null && !userStrategyRelPoList.isEmpty()) {
//            return getFailResult("所选用户有的已绑定策略，请重新选择。");
//        } else {
//            return getSuccessResult();
//        }
//    }
//
//    /**
//     * 人员设置
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "人员设置", notes = "新增用户策略关系表", httpMethod = "POST")
//    @Loggable(descp = "人员设置-新增用户策略关系表", type = LogTypeEnum.CREATE, include = "")
//    @RequestMapping(value = "/addStrategyUser", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<UserStrategyRelVo> addStrategyUser(@ModelAttribute @Valid UserStrategyRelCreateForm form) throws BusinessServiceException {
//        logger.info("人员设置-新增用户策略关系表");
//        //先删除当前策略关联的所有人
//        //TODO 春哥说不删除原先人员 增量新增
//        //userStrategyRelService.delete(form.getStrategyId());
//        //定义返回给页面的实体类
//        UserStrategyRelVo userStrategyRelVo = new UserStrategyRelVo();
//        userStrategyRelVo.setStrategyId(form.getStrategyId());
//        userStrategyRelVo.setUserCodeList(form.getUserCodeList());
//        //再新增当前策略关联的所选人
//        //先判断是否有关联人员
//        List<String> userCodeList = form.getUserCodeList();
//        if (userCodeList != null && !userCodeList.isEmpty()) {
//            for (String userCode : userCodeList) {
//                UserStrategyRelPo po = new UserStrategyRelPo();
//                po.setStrategyId(form.getStrategyId());
//                po.setUserCode(userCode);
//                userStrategyRelService.insert(po);
//            }
//        }
//        return getSuccessResult(userStrategyRelVo);
//    }
//
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询自定义管控策略人员绑定", notes = "查询自定义管控策略人员绑定", httpMethod = "GET")
//    @Loggable(descp = "查询自定义管控策略人员绑定", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryDetail", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<CentreCutPageResponse<UserVo>> queryDetail(@ModelAttribute @Valid StrategyControlQueryForm form) throws  BusinessServiceException {
//        UserStrategyRelCondition condition = new UserStrategyRelCondition();
//        //装载
//        condition.setStrategyId(form.getId());
//        condition.setPageSize(form.getPageSize());
//        condition.setPageNum(form.getPageNum());
//        List<UserVo> poList = new ArrayList<>();
//        int count = userStrategyRelService.queryCount(condition);
//        if (count > 0) {
//            List<UserStrategyRelPo> userStrategyRelPos = userStrategyRelService.queryList(condition);
//            for (UserStrategyRelPo userStrategyRelPo:userStrategyRelPos){
//                poList.add(orgServiceApi.queryUserByUserCode(userStrategyRelPo.getUserCode()));
//            }
//        }
//        return getSuccessResult(getPageResponse(form, count, poList));
//    }
//
//    /**
//     * 修改管控策略
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "修改管控策略", notes = "修改管控策略", httpMethod = "POST")
//    @Loggable(descp = "修改管控策略", type = LogTypeEnum.UPDATE, include = "")
//    @RequestMapping(value = "/update", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity update(@ModelAttribute @Valid StrategyControlUpdateForm form, HttpServletRequest request) throws BusinessServiceException {
//        logger.info("修改管控策略");
//        StrategyControlPo po = CopyUtil.transfer(form, StrategyControlPo.class);
//        //获取更新人编号,调用接口获取
//        String updateUserCode = getUserCode();
//        //设置更新人编号
//        po.setUpdateUserCode(updateUserCode);
//        //设置更新时间
//        po.setUpdateTime(new Date());
//        strategyControlService.update(po);
//        return getSuccessResult();
//    }
//
//    /**
//     * 删除/批量删除管控策略
//     *
//     * @param userCode
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "删除管控策略", notes = "删除管控策略", httpMethod = "POST")
//    @Loggable(descp = "删除管控策略", type = LogTypeEnum.DELETE, include = "")
//    @RequestMapping(value = "/deleteByUserCode", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity deleteByUserCode(@ApiParam(value = "userCode", required = true) @RequestParam String  userCode) throws BusinessServiceException {
//        logger.info("删除自定义管控策略绑定人员");
//        if (StringUtils.isEmpty(userCode)) {
//            return getFailResult("参数不能为空");
//        }
//        userStrategyRelService.deleteByUserCode(userCode);
//        return getSuccessResult();
//
//    }
//
//    /**
//     * 删除/批量删除管控策略
//     *
//     * @param id
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "删除管控策略", notes = "删除管控策略", httpMethod = "POST")
//    @Loggable(descp = "删除管控策略", type = LogTypeEnum.DELETE, include = "")
//    @RequestMapping(value = "/delete", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity delete(@ApiParam(value = "ID", required = true) @RequestParam List<Integer> id) throws BusinessServiceException {
//        logger.info("删除管控策略");
//        if (CollectionUtils.isEmpty(id)) {
//            return getFailResult("参数不能为空");
//        } else {
//
//
//            for (Integer item : id) {
//                StrategyControlPo po = new StrategyControlPo();
//                po.setId(item);
//                po.setDelFlag(BusinessConstants.DelFlag.DELETED);
//                strategyControlService.update(po);
//
//                //这边有个坑，把sql改了，传的是strategyid
//                userStrategyRelService.delete(item);
////                //关联表也要删，物理删除
////                UserStrategyRelCondition relCondition = new UserStrategyRelCondition();
////                relCondition.setStrategyId(item);
////                relCondition.setPageSize(Integer.MAX_VALUE);
////                list<UserStrategyRelPo> relPos = userStrategyRelService.queryList(relCondition);
////                for (UserStrategyRelPo relPo : relPos) {
////
////                }
//
//
//            }
//
//
//            return getSuccessResult();
//        }
//    }
//
//    /**
//     * 设置内置管控策略
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "设置内置管控策略", notes = "设置内置管控策略", httpMethod = "POST")
//    @Loggable(descp = "设置内置管控策略", type = LogTypeEnum.UPDATE, include = "")
//    @RequestMapping(value = "/updateBuildInStrategy", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity updateBuildInStrategy(@ModelAttribute @Valid StrategyBuildInForm form) throws BusinessServiceException {
//        strategyControlService.updateBuildInStrategy(form);
//        return getSuccessResult();
//    }
//
//    /**
//     * 查询风险模式
//     *
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询风险模式", notes = "查询风险模式", httpMethod = "POST")
//    @Loggable(descp = "查询风险模式", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryRiskModel", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<List<Object>> queryRiskModel(@RequestParam String dataType) throws BusinessServiceException {
//        DatadictQueryForm form = new DatadictQueryForm();
//        form.setDataDictTypeCode(dataType);
//        ResponseEntity<CentreListResponse<DatadictVo>> dictEntity = orgServiceApi.queryDatadictFullList(form);
//        ResponseEntity levelEntity = orgServiceApi.queryDatadictByCode(BusinessConstants.RISK_LEVEL_CODE);
//        List<Object> list = new ArrayList<>();
//        if (dictEntity != null && BusinessConstants.HANDLE_SUCCESS.equals(dictEntity.getResult())) {
//            list.add(dictEntity.getData().getDataList());
//        }
//        if (levelEntity != null && BusinessConstants.HANDLE_SUCCESS.equals(levelEntity.getResult())) {
//            list.add(levelEntity.getData());
//        }
//        return new ResponseEntity("ok", 200, "操作成功", list);
//    }
//
//    /**
//     * 查询启用风险模式
//     *
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "查询启用风险模式", notes = "查询启用风险模式", httpMethod = "POST")
//    @Loggable(descp = "查询启用风险模式", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryRiskModelActive", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<CentreListResponse<DatadictVo>> queryRiskModelActive() throws BusinessServiceException {
//        DatadictQueryForm form = new DatadictQueryForm();
//        form.setDataDictTypeCode(BusinessConstants.RISK_MODEL_CODE);
//        form.setStatus(0);
//        return orgServiceApi.queryDatadictFullList(form);
//    }
//
//
//    /**
//     * 获取处理策略
//     *
//     * @param form
//     * @return
//     * @throws BusinessServiceException
//     */
//    @NeedRole("secadminrole")
//    @ApiOperation(value = "获取处理策略", notes = "获取处理策略", httpMethod = "POST")
//    @Loggable(descp = "获取处理策略", type = LogTypeEnum.QUERY, include = "")
//    @RequestMapping(value = "/queryStrategyByRisk", method = {RequestMethod.GET, RequestMethod.POST})
//    public ResponseEntity<List<String>> queryStrategyByRisk(@ModelAttribute @Valid StrategyControlQueryForm form) throws BusinessServiceException {
//        List<String> list = strategyControlService.queryStrategyByRisk(form);
//        if (list != null && !list.isEmpty()) {
//            return getSuccessResult(list);
//        } else {
//            return getFailResult("没有匹配的管控策略");
//        }
//    }
//
//
//    //需要添加的接口有：风险等级列表查询、业务处理列表查询、组织树结构、
//
//
//    /**
//     * StrategyControlQueryForm转换为StrategyControlCondition
//     *
//     * @param form
//     * @return
//     */
//    private StrategyControlCondition getConditionByQueryForm(StrategyControlQueryForm form) {
//        StrategyControlCondition condition = CopyUtil.transfer(form, StrategyControlCondition.class);
//        return condition;
//    }
//
//}